<template>
  <div>这是视频页面</div>
  <button @click="toLogin">跳转到登录页</button>
  <div v-for="item in 30" :key="item">{{ item }}</div>
</template>

<script>
import Login from "../../login/Index.vue";
export default {
  methods: {
    toLogin() {
      // 动态添加路由
      this.$router.addRoute({ path: "/login", component: Login });
      this.$router.push("/login");
    },
  },
};
</script>
